<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <title>{{$books->book_name}} - 夜读书</title>
    <meta name="viewport" content="width=device-width, height=device-height, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
    <meta name="format-detection" content="telephone=no">
    <meta name="author" content="夜读书">
    <meta name="description" content="{{mb_substr(strip_tags($books->neirongjianjie),0,160)}}">
    <meta name="keywords" content="{{$books->book_name}},{{$books->book_name}}的书评,{{$books->book_name}}简介,{{$books->book_name}}的作者,夜读书">
    <link rel="stylesheet" href="{{ asset('/bootstrap-3.3.5-dist/css/bootstrap.min.css') }}">
    <link rel="stylesheet" href="{{ asset('/style/css/mobile.css') }}">    
    <script src="{{ asset('/scripts/jquery/jquery-1.11.3.min.js') }}"></script>
    <script src="{{ asset('/bootstrap-3.3.5-dist/js/bootstrap.min.js') }}"></script>
</head>
<body>
@include('mobile.nav')
<div id="booksinfo" class="page">
	<div class="card">
	    <h1>{{$books->book_name}}</h1>
	    <div class="subject-info">
	        <div class="bimg">
	          <a href={{url($books->bimg_m)}} target="_blank"><img class="cover" src="http://www.yedushu.com/{{$books->bimg}}"></img></a>
	        </div>
	        <div class="bmeta">
	       	    <p class="meta">
	       	    @if($books->zuozhe!="") {{ $books->zuozhe }} / @endif
	       	    @if($books->yizhe!="") {{ $books->yizhe }} / @endif
	       	    @if($books->chubanshe!="") {{ $books->chubanshe }} / @endif
	       	    @if($books->yeshu!="") {{ $books->yeshu }}页 @endif / 
	       	    @if($books->zhuangzhen!="") {{ $books->zhuangzhen }} / @endif
	       	    @if($books->dingjia!="") {{ $books->dingjia }}元 / @endif
	       	    @if($books->chubannian!="") {{ $books->chubannian }} / @endif
	       	    @if($books->isbn!="") isbn:{{ $books->isbn }} @endif
	       	    </p>
	        </div>
	    </div>
	    @if($bagscount == 0)
	    <div class="">
	       <a target="_blank" href="http://union.dangdang.com/transfer.php?from=P-328825&ad_type=10&sys_id=1&backurl=http://search.dangdang.com/search.php?key={{ $books->book_name }}"><span style="color:#42bd56;">去当当网购买这本书</span></a>
	    </div> 
	    @else
	    <div class="">
	       <a href="{{url('mobile/'. $books->book_id .'/countlist')}}"><span style="color:#42bd56;">有{{$bagscount}}位会员在转让本书</span></a>
	    </div> 
	    @endif
	    <div class="zr">
	       <a href="{{url('mobile/info/' . $books->book_id . '/new_offer')}}">手里有一本闲着？点这里转让></a>
	    </div> 
	    @if($books->neirongjianjie!="")
	    <div class="subject-intro">
	   	    <h2>{{$books->book_name}}的内容简介</h2>
	   	    <p>{!! $books->neirongjianjie !!}</p>
	    </div>
	    @endif
	    @if($books->zuozhejianjie!="")
	    <div class="subject-zuozhe">
	   	    <h2>作者的简介</h2>
	   	    <p>{!! $books->zuozhejianjie !!}</p>
	    </div>
	    @endif
	    @if($books->mulu!="")
	    <div class="subject-mulu">
	   	    <h2>目录的简介</h2>
	   	    <p>{!! $books->mulu !!}</p>
	    </div>
	    @endif
	    <div class="subject-comments">
	    	<h2 style="float:right;"><a href="{{url('mobile/comment/'. $books->book_id .'/commentpost')}}">发短评</a></h2>
	   	    <h2>{{$books->book_name}}的短评({{$bookscomments_count}})</h2>
	   	    <div class="com">
	   	    	<ul class="list comment-list">
	   	    	@foreach($bookscomments as $bookscomment)
	   	    		<li>
	   	    		    <div class="desc">
	   	    		    	<!-- <a href="{{url('mobile/uhome/' . $bookscomment->users->uid)}}"> -->
	   	    		    	@if(Session::get('nameid') == $bookscomment->users->uid)
						    	<a href="{{url('mobile/myhome')}}" target="_blank">
						    @else
						    	<a href="{{url('mobile/uhome/'. $bookscomment->users->uid)}}" target="_blank">
						    @endif 	    		    
	   	    		    	@if($bookscomment->users->avatar_file_min!="")	   	    		    	
                                <img src="http://www.yedushu.com/{{ $bookscomment->users->avatar_file_min }}">
                            @else
                                <img src="http://www.yedushu.com/usersface/default/avatar-min.png">
                            </a>
                            @endif
	   	    		    	<strong>
	   	    		    		@if(Session::get('nameid') == $bookscomment->users->uid)
						    	<a href="{{url('mobile/myhome')}}" target="_blank">
							    @else
							    	<a href="{{url('mobile/uhome/'. $bookscomment->users->uid)}}" target="_blank">
							    @endif
	   	    		    			{{ $bookscomment->users->user_name }}
	   	    		    		</a>
	   	    		    	</strong>
	   	    		    </div>
	   	    		    <p>{!! $bookscomment->message !!}</p>
	   	    		</li>
	   	        @endforeach
	   	    	</ul>
	   	    	@if($bookscomments_count > 3)
	   	    	<div class="" style="text-align: center;"><a href="{{url('mobile/comment/' . $books->book_id)}}"><span style="color:#42bd56;">查看全部短评</span></a></div>
	   	    	@endif
	   	    </div>
	    </div>
	    <div class="subject-reviews">
	    	<h2 style="float:right;"><a href="{{url('mobile/reviewslist/'. $books->book_id .'/reviewslistpost')}}">发长评</a></h2>
	   	    <h2>{{$books->book_name}}的书评({{$booksreviews_count}})</h2>
	   	    <div class="rev">
	   	    	<ul class="list">
	   	    	@foreach($booksreviews as $booksreview)
	   	    		<li>
	   	    			<h3>
	   	    			    <a href="{{url('mobile/shupinginfo')}}/{{$booksreview->id}}" title="{{$booksreview->title}}">{{$booksreview->title}}</a>
	   	    			</h3>
	   	    		</li>
	   	        @endforeach
	   	    	</ul>
	   	    	@if($booksreviews_count > 3)
	   	    	<div class="" style="text-align: center;"><a href="{{url('mobile/reviewslist/' . $books->book_id)}}"><span style="color:#42bd56;">查看全部书评</span></a></div>
	   	    	@endif
	   	    </div>
	    </div>
	    <div class="subject-shuzhai">
	    	<h2 style="float:right;"><a href="{{url('shuzhai/pubshuzhai/'. $books->book_id)}}">发书摘</a></h2>
	   	    <h2>{{$books->book_name}}的书摘(0)</h2>
	   	    <!-- <div class="rev">
	   	    	<ul class="list">
	   	    	@foreach($booksreviews as $booksreview)
	   	    		<li>
	   	    			<h3>
	   	    			    <a href="{{url('mobile/shupinginfo')}}/{{$booksreview->id}}" title="{{$booksreview->title}}">{{$booksreview->title}}</a>
	   	    			</h3>
	   	    		</li>
	   	        @endforeach
	   	    	</ul>
	   	    	@if($booksreviews_count > 3)
	   	    	<div class="" style="text-align: center;"><a href="{{url('mobile/reviewslist/' . $books->book_id)}}"><span style="color:#42bd56;">查看全部书评</span></a></div>
	   	    	@endif
	   	    </div> -->
	    </div>
	</div>	
</div>
@include('mobile.footer')
</body>
</html>